﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace DataAnalyseClient
{
    /// <summary>
    /// CloseLoderWindow.xaml 的交互逻辑
    /// </summary>
    public partial class CloseLoderWindow : Window
    {
        public CloseLoderWindow()
        {
            InitializeComponent();
            this.Loaded += CloseLoderWindow_Loaded;
        }

        private void CloseLoderWindow_Loaded(object sender, RoutedEventArgs e)
        {
            Thread thread = new Thread(() =>
            {
                Thread.Sleep(5000);
                Action action = () =>
                {
                    this.DialogResult = true;
                    this.Close();
                };
                this.Dispatcher.BeginInvoke(action);
            });
            thread.Start();
        }
    }
}
